#include<stdio.h>
#include<string.h>
#include<math.h>
struct f
{
    int num;
    struct f *next;
};
int main()
{
    struct f *p, *q;//p为头结点，q创结点
    int i,n,j;
    while(~scanf("%d",&n))
    {
      p = (struct f *)malloc(sizeof(struct f));
      p->next = NULL;
      for (i = 0, j = n - 1; i < n; i++,j--)
      {
        q = (struct f *)malloc(sizeof(struct f));
        q->num = j;
        q->next = p->next;//保留原有关系
        p->next = q;//在头指针后插入新结点
      }
      while(q!=NULL)
      {
        printf("%d ", q->num);
        q = q->next;
      }
      printf("\n");
    }
    return 0;
}